package com.treasure.mall.biz.dto.live;

import com.treasure.mall.biz.dto.BaseDTO;
import com.treasure.mall.biz.entity.user.UserPO;
import com.treasure.mall.zbq.common.Jsr310Utils;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 进入直播间的用户
 *
 * @author allan
 * @version 1.0.0
 * @date 2020/6/13
 */
@Data
@NoArgsConstructor
public class LiveMemberDTO implements BaseDTO {
    private static final long serialVersionUID = 5611231519823836804L;

    private Long userId;
    private String nickname;
    private String face;
    private double consumeAmount;
    private String enterTime;

    public LiveMemberDTO(UserPO userPO) {
        this.userId = userPO.getUserId();
        this.nickname = userPO.getNickName();
        this.face = userPO.getAvatar();
        this.enterTime = Jsr310Utils.DateTime.asString(LocalDateTime.now());
        // TODO: 2020/6/13 consumeAmount
    }
}
